home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / alib / csup / PROTOS / alib_protos.h next >
C/C++ Source or Header  |  1995-12-24  |  5KB  |  132 lines

  1. #ifndef  CLIB_ALIB_PROTOS_H
  2. #define  CLIB_ALIB_PROTOS_H
  3.  
  4. /*
  5. **    $Id: alib_protos.h,v 30.0 1994/06/10 18:10:34 dice Exp $
  6. **
  7. **    C prototypes. For use with 32 bit integers only.
  8. **
  9. **    (C) Copyright 1990 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef  EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16. #ifndef  DEVICES_TIMER_H
  17. #include <devices/timer.h>
  18. #endif
  19. #ifndef  DEVICES_KEYMAP_H
  20. #include <devices/keymap.h>
  21. #endif
  22. #ifndef  LIBRARIES_COMMODITIES_H
  23. #include <libraries/commodities.h>
  24. #endif
  25. #ifndef  UTILITY_HOOKS_H
  26. #include <utility/hooks.h>
  27. #endif
  28. #ifndef  INTUITION_CLASSES_H
  29. #include <intuition/classes.h>
  30. #endif
  31. #ifndef  INTUITION_CLASSUSR_H
  32. #include <intuition/classusr.h>
  33. #endif
  34. #ifndef  GRAPHICS_GRAPHINT_H
  35. #include <graphics/graphint.h>
  36. #endif
  37.  
  38. /*  Exec support functions */
  39.  
  40. void BeginIO( struct IORequest *ioReq );
  41. struct IORequest *CreateExtIO( struct MsgPort *port, long ioSize );
  42. struct MsgPort *CreatePort( STRPTR name, long pri );
  43. struct IOStdReq *CreateStdIO( struct MsgPort *port );
  44. struct Task *CreateTask( STRPTR name, long pri, APTR initPC,
  45.     unsigned long stackSize );
  46. void DeleteExtIO( struct IORequest *ioReq );
  47. void DeletePort( struct MsgPort *ioReq );
  48. void DeleteStdIO( struct IOStdReq *ioReq );
  49. void DeleteTask( struct Task *task );
  50. void NewList( struct List *list );
  51. APTR LibAllocPooled( APTR poolHeader, unsigned long memSize );
  52. APTR LibCreatePool( unsigned long memFlags, unsigned long puddleSize,
  53.     unsigned long threshSize );
  54. void LibDeletePool( APTR poolHeader );
  55. void LibFreePooled( APTR poolHeader, APTR memory, unsigned long memSize );
  56.  
  57. /* Assorted functions in amiga.lib */
  58.  
  59. ULONG FastRand( unsigned long seed );
  60. UWORD RangeRand( unsigned long maxValue );
  61.  
  62. /* Graphics support functions in amiga.lib */
  63.  
  64. void AddTOF( struct Isrvstr *i, long (*p)(), long a );
  65. void RemTOF( struct Isrvstr *i );
  66. void waitbeam( long b );
  67.  
  68. /* math support functions in amiga.lib */
  69.  
  70. FLOAT afp( BYTE *string );
  71. void arnd( long place, long exp, BYTE *string );
  72. FLOAT dbf( unsigned long exp, unsigned long mant );
  73. LONG fpa( FLOAT fnum, BYTE *string );
  74. void fpbcd( FLOAT fnum, BYTE *string );
  75.  
  76. /* Timer support functions in amiga.lib (V36 and higher only) */
  77.  
  78. LONG TimeDelay( long unit, unsigned long secs, unsigned long microsecs );
  79. LONG DoTimer( struct timeval *, long unit, long command );
  80.  
  81. /*  Commodities functions in amiga.lib (V36 and higher only) */
  82.  
  83. void ArgArrayDone( void );
  84. UBYTE **ArgArrayInit( long argc, UBYTE **argv );
  85. LONG ArgInt( UBYTE **tt, STRPTR entry, long defaultval );
  86. STRPTR ArgString( UBYTE **tt, STRPTR entry, STRPTR defaulstring );
  87. CxObj *HotKey( STRPTR description, struct MsgPort *port, long id );
  88. struct InputEvent *InvertString( STRPTR str, struct KeyMap *km );
  89. void FreeIEvents( struct InputEvent *events );
  90.  
  91. /* Commodities Macros */
  92.  
  93. /* CxObj *CxCustom(LONG(*)(),LONG id)(A0,D0) */
  94. /* CxObj *CxDebug(LONG id)(D0) */
  95. /* CxObj *CxFilter(STRPTR description)(A0) */
  96. /* CxObj *CxSender(struct MsgPort *port,LONG id)(A0,D0) */
  97. /* CxObj *CxSignal(struct Task *task,LONG signal)(A0,D0) */
  98. /* CxObj *CxTranslate(struct InputEvent *ie)(A0) */
  99.  
  100. /*  ARexx support functions in amiga.lib */
  101.  
  102. BOOL CheckRexxMsg( struct Message *rexxmsg );
  103. LONG GetRexxVar( struct Message *rexxmsg, UBYTE *name, UBYTE **result );
  104. LONG SetRexxVar( struct Message *rexxmsg, UBYTE *name, UBYTE *value,
  105.     long length );
  106.  
  107. /*  Intuition hook and boopsi support functions in amiga.lib. */
  108. /*  These functions do not require any particular ROM revision */
  109. /*  to operate correctly, though they deal with concepts first introduced */
  110. /*  in V36.  These functions would work with compatibly-implemented */
  111. /*  hooks or objects under V34. */
  112.  
  113. ULONG CallHookA( struct Hook *hookPtr, Object *obj, APTR message );
  114. ULONG CallHook( struct Hook *hookPtr, Object *obj, ... );
  115. ULONG DoMethodA( Object *obj, Msg message );
  116. ULONG DoMethod( Object *obj, unsigned long MethodID, ... );
  117. ULONG DoSuperMethodA( struct IClass *cl, Object *obj, Msg message );
  118. ULONG DoSuperMethod( struct IClass *cl, Object *obj, unsigned long MethodID,
  119.     ... );
  120. ULONG CoerceMethodA( struct IClass *cl, Object *obj, Msg message );
  121. ULONG CoerceMethod( struct IClass *cl, Object *obj, unsigned long MethodID,
  122.     ... );
  123. ULONG SetSuperAttrs( struct IClass *cl, Object *obj, unsigned long Tag1,
  124.     ... );
  125.  
  126. /*  Network-support functions in amiga.lib. */
  127. /*  ACrypt() first appeared in later V39 versions of amiga.lib, but */
  128. /*  operates correctly under V37 and up. */
  129.  
  130. STRPTR ACrypt( STRPTR buffer, STRPTR password, STRPTR username );
  131. #endif   /* CLIB_ALIB_PROTOS_H */
  132.